<?php

/**
 * 用户信息
 */

namespace app\sale\common;

class UserCommon extends \app\member\common\MemberCommon {


    protected function index() {
        $this->pageInfo['name'] = '用户信息';
        $this->setMeta('用户信息');
        $this->setCrumb([
            [
                'name' => '用户信息',
                'url' => url()
            ]
        ]);

        $userId = request('get', 'id', 0);

        if(empty($userId)) {
            $this->error404();
        }

        $info = target('sale/SaleUser')->getWhereInfo([
            'A.user_id' => $userId
        ]);
        if(empty($info)) {
            $this->error404();
        }

        $this->assign('info', $info);
        $this->memberDisplay();
    }

}